﻿<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Components/Components.Master" CodeBehind="CallbackStrategy.aspx.cs" Inherits="AjaxControlFramework.Docs.Components.CallbackStrategy" %>

<asp:Content runat="server" ContentPlaceHolderID="HeadTitle">
    CallbackStrategy - Components - Docs - AJAX Control Framework
</asp:Content>

<asp:Content runat="server" ContentPlaceHolderID="Title">
    <span class="underline">CallbackStrategy</span> (AjaxControlFramework.CallbackStrategy)
</asp:Content>

<asp:Content runat="server" ContentPlaceHolderID="Overview">
    The CallbackStrategy is definitely the single most important component of the <span class="important">AJAX Control Framework</span>. 
    It is responsible for imposing the augmented Page Event lifecycle used by the framework. Not only that, it handles the invocation 
    of the ScriptStrategy, the StateStrategy and the four base methods associated with every <span class="code_element">IAjaxControl</span> 
    instance. When a custom control inherits from the <span class="code_element">IAjaxControl</span> interface, it is required to implement  
    the <span class="code_element">AjaxControlFramework.IAjaxControl.CallbackStrategy</span> property which makes the strategy 
    available to the internals of your AJAX enabled Controls. The call to the 
    <span class="code_element">AjaxControlFramework.AjaxControl.Initialize</span> method made in the constructor is what actually 
    <span class="important">attaches</span> the CallbackStrategy to your Control which in effect enables all of the 
    <span class="important">AJAX Control Framework</span>'s AJAX functionality.<br />
    
    <br />
    
    The <span class="code_element">AjaxControlFramework.CallbackStrategy</span> class is abstract and implements all of the steps that 
    are vital to correct operation of the <span class="important">AJAX Control Framework</span>'s client-server protocol, while leaving 
    the implementation for the four base methods (Invoke, GlobalInvoke, Update and GlobalUpdate) to derivations of the class. A default 
    implementation of the four base methods is provided by the <span class="code_element">AjaxControlFramework.ControlCallbackStrategy</span> 
    class. The <span class="code_element">AjaxControlFramework.ControlCallbackStrategy</span> implementation is assigned to all 
    <span class="code_element">IAjaxControl</span> instances by default. You may override this default assignment with your own custom 
    CallbackStrategy implementation.
</asp:Content>

<asp:Content runat="server" ContentPlaceHolderID="Remarks">
    Following the <a href="http://en.wikipedia.org/wiki/Strategy_pattern">"Strategy" design pattern</a>, this component encapsulates the 
    protocol that makes the <span class="important">AJAX Control Framework</span> so fast and efficient. 
</asp:Content>
    
<asp:Content runat="server" ContentPlaceHolderID="Examples">
    
</asp:Content>